package com.shbt.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TPayBack entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_pay_back", catalog = "default_schema")
public class TPayBack implements java.io.Serializable {

	// Fields

	private Integer id;
	private String payBackCode;
	private String payBackWay;
	private Set<TReleaseBuy> TReleaseBuies = new HashSet<TReleaseBuy>(0);
	private Set<TReleaseSell> TReleaseSells = new HashSet<TReleaseSell>(0);

	// Constructors

	/** default constructor */
	public TPayBack() {
	}

	/** minimal constructor */
	public TPayBack(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public TPayBack(Integer id, String payBackCode, String payBackWay,
			Set<TReleaseBuy> TReleaseBuies, Set<TReleaseSell> TReleaseSells) {
		this.id = id;
		this.payBackCode = payBackCode;
		this.payBackWay = payBackWay;
		this.TReleaseBuies = TReleaseBuies;
		this.TReleaseSells = TReleaseSells;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "pay_back_code", length = 20)
	public String getPayBackCode() {
		return this.payBackCode;
	}

	public void setPayBackCode(String payBackCode) {
		this.payBackCode = payBackCode;
	}

	@Column(name = "pay_back_way", length = 50)
	public String getPayBackWay() {
		return this.payBackWay;
	}

	public void setPayBackWay(String payBackWay) {
		this.payBackWay = payBackWay;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TPayBack")
	public Set<TReleaseBuy> getTReleaseBuies() {
		return this.TReleaseBuies;
	}

	public void setTReleaseBuies(Set<TReleaseBuy> TReleaseBuies) {
		this.TReleaseBuies = TReleaseBuies;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TPayBack")
	public Set<TReleaseSell> getTReleaseSells() {
		return this.TReleaseSells;
	}

	public void setTReleaseSells(Set<TReleaseSell> TReleaseSells) {
		this.TReleaseSells = TReleaseSells;
	}

}